// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗  
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝  
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//  
// This file is automatically generated 
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// 		*NIX 		:	./build.sh codegen
// 		Windows 	:	build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Threading;
using System.Threading.Tasks;
using Elasticsearch.Net.Specification.SecurityApi;

// ReSharper disable once CheckNamespace
// ReSharper disable RedundantTypeArgumentsOfMethod
namespace Nest.Specification.SecurityApi
{
	///<summary>
	/// Security APIs.
	/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticClient.Security"/> property
	/// on <see cref = "IElasticClient"/>.
	///</para>
	///</summary>
	public class SecurityNamespace : NamespacedClientProxy
	{
		internal SecurityNamespace(ElasticClient client): base(client)
		{
		}

		/// <summary>
		/// <c>GET</c> request to the <c>security.authenticate</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html</a>
		/// </summary>
		public AuthenticateResponse Authenticate(Func<AuthenticateDescriptor, IAuthenticateRequest> selector = null) => Authenticate(selector.InvokeOrDefault(new AuthenticateDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>security.authenticate</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html</a>
		/// </summary>
		public Task<AuthenticateResponse> AuthenticateAsync(Func<AuthenticateDescriptor, IAuthenticateRequest> selector = null, CancellationToken ct = default) => AuthenticateAsync(selector.InvokeOrDefault(new AuthenticateDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.authenticate</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html</a>
		/// </summary>
		public AuthenticateResponse Authenticate(IAuthenticateRequest request) => DoRequest<IAuthenticateRequest, AuthenticateResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.authenticate</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html</a>
		/// </summary>
		public Task<AuthenticateResponse> AuthenticateAsync(IAuthenticateRequest request, CancellationToken ct = default) => DoRequestAsync<IAuthenticateRequest, AuthenticateResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.change_password</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html</a>
		/// </summary>
		public ChangePasswordResponse ChangePassword(Func<ChangePasswordDescriptor, IChangePasswordRequest> selector) => ChangePassword(selector.InvokeOrDefault(new ChangePasswordDescriptor()));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.change_password</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html</a>
		/// </summary>
		public Task<ChangePasswordResponse> ChangePasswordAsync(Func<ChangePasswordDescriptor, IChangePasswordRequest> selector, CancellationToken ct = default) => ChangePasswordAsync(selector.InvokeOrDefault(new ChangePasswordDescriptor()), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.change_password</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html</a>
		/// </summary>
		public ChangePasswordResponse ChangePassword(IChangePasswordRequest request) => DoRequest<IChangePasswordRequest, ChangePasswordResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.change_password</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html</a>
		/// </summary>
		public Task<ChangePasswordResponse> ChangePasswordAsync(IChangePasswordRequest request, CancellationToken ct = default) => DoRequestAsync<IChangePasswordRequest, ChangePasswordResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_realms</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html</a>
		/// </summary>
		public ClearCachedRealmsResponse ClearCachedRealms(Names realms, Func<ClearCachedRealmsDescriptor, IClearCachedRealmsRequest> selector = null) => ClearCachedRealms(selector.InvokeOrDefault(new ClearCachedRealmsDescriptor(realms: realms)));
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_realms</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html</a>
		/// </summary>
		public Task<ClearCachedRealmsResponse> ClearCachedRealmsAsync(Names realms, Func<ClearCachedRealmsDescriptor, IClearCachedRealmsRequest> selector = null, CancellationToken ct = default) => ClearCachedRealmsAsync(selector.InvokeOrDefault(new ClearCachedRealmsDescriptor(realms: realms)), ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_realms</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html</a>
		/// </summary>
		public ClearCachedRealmsResponse ClearCachedRealms(IClearCachedRealmsRequest request) => DoRequest<IClearCachedRealmsRequest, ClearCachedRealmsResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_realms</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html</a>
		/// </summary>
		public Task<ClearCachedRealmsResponse> ClearCachedRealmsAsync(IClearCachedRealmsRequest request, CancellationToken ct = default) => DoRequestAsync<IClearCachedRealmsRequest, ClearCachedRealmsResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_roles</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html</a>
		/// </summary>
		public ClearCachedRolesResponse ClearCachedRoles(Names name, Func<ClearCachedRolesDescriptor, IClearCachedRolesRequest> selector = null) => ClearCachedRoles(selector.InvokeOrDefault(new ClearCachedRolesDescriptor(name: name)));
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_roles</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html</a>
		/// </summary>
		public Task<ClearCachedRolesResponse> ClearCachedRolesAsync(Names name, Func<ClearCachedRolesDescriptor, IClearCachedRolesRequest> selector = null, CancellationToken ct = default) => ClearCachedRolesAsync(selector.InvokeOrDefault(new ClearCachedRolesDescriptor(name: name)), ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_roles</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html</a>
		/// </summary>
		public ClearCachedRolesResponse ClearCachedRoles(IClearCachedRolesRequest request) => DoRequest<IClearCachedRolesRequest, ClearCachedRolesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>POST</c> request to the <c>security.clear_cached_roles</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html</a>
		/// </summary>
		public Task<ClearCachedRolesResponse> ClearCachedRolesAsync(IClearCachedRolesRequest request, CancellationToken ct = default) => DoRequestAsync<IClearCachedRolesRequest, ClearCachedRolesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.create_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html</a>
		/// </summary>
		public CreateApiKeyResponse CreateApiKey(Func<CreateApiKeyDescriptor, ICreateApiKeyRequest> selector) => CreateApiKey(selector.InvokeOrDefault(new CreateApiKeyDescriptor()));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.create_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html</a>
		/// </summary>
		public Task<CreateApiKeyResponse> CreateApiKeyAsync(Func<CreateApiKeyDescriptor, ICreateApiKeyRequest> selector, CancellationToken ct = default) => CreateApiKeyAsync(selector.InvokeOrDefault(new CreateApiKeyDescriptor()), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.create_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html</a>
		/// </summary>
		public CreateApiKeyResponse CreateApiKey(ICreateApiKeyRequest request) => DoRequest<ICreateApiKeyRequest, CreateApiKeyResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.create_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html</a>
		/// </summary>
		public Task<CreateApiKeyResponse> CreateApiKeyAsync(ICreateApiKeyRequest request, CancellationToken ct = default) => DoRequestAsync<ICreateApiKeyRequest, CreateApiKeyResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public DeletePrivilegesResponse DeletePrivileges(Name application, Name name, Func<DeletePrivilegesDescriptor, IDeletePrivilegesRequest> selector = null) => DeletePrivileges(selector.InvokeOrDefault(new DeletePrivilegesDescriptor(application: application, name: name)));
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public Task<DeletePrivilegesResponse> DeletePrivilegesAsync(Name application, Name name, Func<DeletePrivilegesDescriptor, IDeletePrivilegesRequest> selector = null, CancellationToken ct = default) => DeletePrivilegesAsync(selector.InvokeOrDefault(new DeletePrivilegesDescriptor(application: application, name: name)), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public DeletePrivilegesResponse DeletePrivileges(IDeletePrivilegesRequest request) => DoRequest<IDeletePrivilegesRequest, DeletePrivilegesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public Task<DeletePrivilegesResponse> DeletePrivilegesAsync(IDeletePrivilegesRequest request, CancellationToken ct = default) => DoRequestAsync<IDeletePrivilegesRequest, DeletePrivilegesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html</a>
		/// </summary>
		public DeleteRoleResponse DeleteRole(Name name, Func<DeleteRoleDescriptor, IDeleteRoleRequest> selector = null) => DeleteRole(selector.InvokeOrDefault(new DeleteRoleDescriptor(name: name)));
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html</a>
		/// </summary>
		public Task<DeleteRoleResponse> DeleteRoleAsync(Name name, Func<DeleteRoleDescriptor, IDeleteRoleRequest> selector = null, CancellationToken ct = default) => DeleteRoleAsync(selector.InvokeOrDefault(new DeleteRoleDescriptor(name: name)), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html</a>
		/// </summary>
		public DeleteRoleResponse DeleteRole(IDeleteRoleRequest request) => DoRequest<IDeleteRoleRequest, DeleteRoleResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html</a>
		/// </summary>
		public Task<DeleteRoleResponse> DeleteRoleAsync(IDeleteRoleRequest request, CancellationToken ct = default) => DoRequestAsync<IDeleteRoleRequest, DeleteRoleResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html</a>
		/// </summary>
		public DeleteRoleMappingResponse DeleteRoleMapping(Name name, Func<DeleteRoleMappingDescriptor, IDeleteRoleMappingRequest> selector = null) => DeleteRoleMapping(selector.InvokeOrDefault(new DeleteRoleMappingDescriptor(name: name)));
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html</a>
		/// </summary>
		public Task<DeleteRoleMappingResponse> DeleteRoleMappingAsync(Name name, Func<DeleteRoleMappingDescriptor, IDeleteRoleMappingRequest> selector = null, CancellationToken ct = default) => DeleteRoleMappingAsync(selector.InvokeOrDefault(new DeleteRoleMappingDescriptor(name: name)), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html</a>
		/// </summary>
		public DeleteRoleMappingResponse DeleteRoleMapping(IDeleteRoleMappingRequest request) => DoRequest<IDeleteRoleMappingRequest, DeleteRoleMappingResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html</a>
		/// </summary>
		public Task<DeleteRoleMappingResponse> DeleteRoleMappingAsync(IDeleteRoleMappingRequest request, CancellationToken ct = default) => DoRequestAsync<IDeleteRoleMappingRequest, DeleteRoleMappingResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html</a>
		/// </summary>
		public DeleteUserResponse DeleteUser(Name username, Func<DeleteUserDescriptor, IDeleteUserRequest> selector = null) => DeleteUser(selector.InvokeOrDefault(new DeleteUserDescriptor(username: username)));
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html</a>
		/// </summary>
		public Task<DeleteUserResponse> DeleteUserAsync(Name username, Func<DeleteUserDescriptor, IDeleteUserRequest> selector = null, CancellationToken ct = default) => DeleteUserAsync(selector.InvokeOrDefault(new DeleteUserDescriptor(username: username)), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html</a>
		/// </summary>
		public DeleteUserResponse DeleteUser(IDeleteUserRequest request) => DoRequest<IDeleteUserRequest, DeleteUserResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.delete_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html</a>
		/// </summary>
		public Task<DeleteUserResponse> DeleteUserAsync(IDeleteUserRequest request, CancellationToken ct = default) => DoRequestAsync<IDeleteUserRequest, DeleteUserResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.disable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html</a>
		/// </summary>
		public DisableUserResponse DisableUser(Name username, Func<DisableUserDescriptor, IDisableUserRequest> selector = null) => DisableUser(selector.InvokeOrDefault(new DisableUserDescriptor(username: username)));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.disable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html</a>
		/// </summary>
		public Task<DisableUserResponse> DisableUserAsync(Name username, Func<DisableUserDescriptor, IDisableUserRequest> selector = null, CancellationToken ct = default) => DisableUserAsync(selector.InvokeOrDefault(new DisableUserDescriptor(username: username)), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.disable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html</a>
		/// </summary>
		public DisableUserResponse DisableUser(IDisableUserRequest request) => DoRequest<IDisableUserRequest, DisableUserResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.disable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html</a>
		/// </summary>
		public Task<DisableUserResponse> DisableUserAsync(IDisableUserRequest request, CancellationToken ct = default) => DoRequestAsync<IDisableUserRequest, DisableUserResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.enable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html</a>
		/// </summary>
		public EnableUserResponse EnableUser(Name username, Func<EnableUserDescriptor, IEnableUserRequest> selector = null) => EnableUser(selector.InvokeOrDefault(new EnableUserDescriptor(username: username)));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.enable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html</a>
		/// </summary>
		public Task<EnableUserResponse> EnableUserAsync(Name username, Func<EnableUserDescriptor, IEnableUserRequest> selector = null, CancellationToken ct = default) => EnableUserAsync(selector.InvokeOrDefault(new EnableUserDescriptor(username: username)), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.enable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html</a>
		/// </summary>
		public EnableUserResponse EnableUser(IEnableUserRequest request) => DoRequest<IEnableUserRequest, EnableUserResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.enable_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html</a>
		/// </summary>
		public Task<EnableUserResponse> EnableUserAsync(IEnableUserRequest request, CancellationToken ct = default) => DoRequestAsync<IEnableUserRequest, EnableUserResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html</a>
		/// </summary>
		public GetApiKeyResponse GetApiKey(Func<GetApiKeyDescriptor, IGetApiKeyRequest> selector = null) => GetApiKey(selector.InvokeOrDefault(new GetApiKeyDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html</a>
		/// </summary>
		public Task<GetApiKeyResponse> GetApiKeyAsync(Func<GetApiKeyDescriptor, IGetApiKeyRequest> selector = null, CancellationToken ct = default) => GetApiKeyAsync(selector.InvokeOrDefault(new GetApiKeyDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html</a>
		/// </summary>
		public GetApiKeyResponse GetApiKey(IGetApiKeyRequest request) => DoRequest<IGetApiKeyRequest, GetApiKeyResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html</a>
		/// </summary>
		public Task<GetApiKeyResponse> GetApiKeyAsync(IGetApiKeyRequest request, CancellationToken ct = default) => DoRequestAsync<IGetApiKeyRequest, GetApiKeyResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_builtin_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html</a>
		/// </summary>
		public GetBuiltinPrivilegesResponse GetBuiltinPrivileges(Func<GetBuiltinPrivilegesDescriptor, IGetBuiltinPrivilegesRequest> selector = null) => GetBuiltinPrivileges(selector.InvokeOrDefault(new GetBuiltinPrivilegesDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_builtin_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html</a>
		/// </summary>
		public Task<GetBuiltinPrivilegesResponse> GetBuiltinPrivilegesAsync(Func<GetBuiltinPrivilegesDescriptor, IGetBuiltinPrivilegesRequest> selector = null, CancellationToken ct = default) => GetBuiltinPrivilegesAsync(selector.InvokeOrDefault(new GetBuiltinPrivilegesDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_builtin_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html</a>
		/// </summary>
		public GetBuiltinPrivilegesResponse GetBuiltinPrivileges(IGetBuiltinPrivilegesRequest request) => DoRequest<IGetBuiltinPrivilegesRequest, GetBuiltinPrivilegesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_builtin_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html</a>
		/// </summary>
		public Task<GetBuiltinPrivilegesResponse> GetBuiltinPrivilegesAsync(IGetBuiltinPrivilegesRequest request, CancellationToken ct = default) => DoRequestAsync<IGetBuiltinPrivilegesRequest, GetBuiltinPrivilegesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public GetPrivilegesResponse GetPrivileges(Name name = null, Func<GetPrivilegesDescriptor, IGetPrivilegesRequest> selector = null) => GetPrivileges(selector.InvokeOrDefault(new GetPrivilegesDescriptor().Name(name: name)));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public Task<GetPrivilegesResponse> GetPrivilegesAsync(Name name = null, Func<GetPrivilegesDescriptor, IGetPrivilegesRequest> selector = null, CancellationToken ct = default) => GetPrivilegesAsync(selector.InvokeOrDefault(new GetPrivilegesDescriptor().Name(name: name)), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public GetPrivilegesResponse GetPrivileges(IGetPrivilegesRequest request) => DoRequest<IGetPrivilegesRequest, GetPrivilegesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public Task<GetPrivilegesResponse> GetPrivilegesAsync(IGetPrivilegesRequest request, CancellationToken ct = default) => DoRequestAsync<IGetPrivilegesRequest, GetPrivilegesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html</a>
		/// </summary>
		public GetRoleResponse GetRole(Name name = null, Func<GetRoleDescriptor, IGetRoleRequest> selector = null) => GetRole(selector.InvokeOrDefault(new GetRoleDescriptor().Name(name: name)));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html</a>
		/// </summary>
		public Task<GetRoleResponse> GetRoleAsync(Name name = null, Func<GetRoleDescriptor, IGetRoleRequest> selector = null, CancellationToken ct = default) => GetRoleAsync(selector.InvokeOrDefault(new GetRoleDescriptor().Name(name: name)), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html</a>
		/// </summary>
		public GetRoleResponse GetRole(IGetRoleRequest request) => DoRequest<IGetRoleRequest, GetRoleResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html</a>
		/// </summary>
		public Task<GetRoleResponse> GetRoleAsync(IGetRoleRequest request, CancellationToken ct = default) => DoRequestAsync<IGetRoleRequest, GetRoleResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html</a>
		/// </summary>
		public GetRoleMappingResponse GetRoleMapping(Name name = null, Func<GetRoleMappingDescriptor, IGetRoleMappingRequest> selector = null) => GetRoleMapping(selector.InvokeOrDefault(new GetRoleMappingDescriptor().Name(name: name)));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html</a>
		/// </summary>
		public Task<GetRoleMappingResponse> GetRoleMappingAsync(Name name = null, Func<GetRoleMappingDescriptor, IGetRoleMappingRequest> selector = null, CancellationToken ct = default) => GetRoleMappingAsync(selector.InvokeOrDefault(new GetRoleMappingDescriptor().Name(name: name)), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html</a>
		/// </summary>
		public GetRoleMappingResponse GetRoleMapping(IGetRoleMappingRequest request) => DoRequest<IGetRoleMappingRequest, GetRoleMappingResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html</a>
		/// </summary>
		public Task<GetRoleMappingResponse> GetRoleMappingAsync(IGetRoleMappingRequest request, CancellationToken ct = default) => DoRequestAsync<IGetRoleMappingRequest, GetRoleMappingResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.get_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html</a>
		/// </summary>
		public GetUserAccessTokenResponse GetUserAccessToken(string username, string password, Func<GetUserAccessTokenDescriptor, IGetUserAccessTokenRequest> selector = null) => GetUserAccessToken(selector.InvokeOrDefault(new GetUserAccessTokenDescriptor(username, password)));
		/// <summary>
		/// <c>POST</c> request to the <c>security.get_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html</a>
		/// </summary>
		public Task<GetUserAccessTokenResponse> GetUserAccessTokenAsync(string username, string password, Func<GetUserAccessTokenDescriptor, IGetUserAccessTokenRequest> selector = null, CancellationToken ct = default) => GetUserAccessTokenAsync(selector.InvokeOrDefault(new GetUserAccessTokenDescriptor(username, password)), ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.get_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html</a>
		/// </summary>
		public GetUserAccessTokenResponse GetUserAccessToken(IGetUserAccessTokenRequest request) => DoRequest<IGetUserAccessTokenRequest, GetUserAccessTokenResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>POST</c> request to the <c>security.get_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html</a>
		/// </summary>
		public Task<GetUserAccessTokenResponse> GetUserAccessTokenAsync(IGetUserAccessTokenRequest request, CancellationToken ct = default) => DoRequestAsync<IGetUserAccessTokenRequest, GetUserAccessTokenResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html</a>
		/// </summary>
		public GetUserResponse GetUser(Func<GetUserDescriptor, IGetUserRequest> selector = null) => GetUser(selector.InvokeOrDefault(new GetUserDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html</a>
		/// </summary>
		public Task<GetUserResponse> GetUserAsync(Func<GetUserDescriptor, IGetUserRequest> selector = null, CancellationToken ct = default) => GetUserAsync(selector.InvokeOrDefault(new GetUserDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html</a>
		/// </summary>
		public GetUserResponse GetUser(IGetUserRequest request) => DoRequest<IGetUserRequest, GetUserResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html</a>
		/// </summary>
		public Task<GetUserResponse> GetUserAsync(IGetUserRequest request, CancellationToken ct = default) => DoRequestAsync<IGetUserRequest, GetUserResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public GetUserPrivilegesResponse GetUserPrivileges(Func<GetUserPrivilegesDescriptor, IGetUserPrivilegesRequest> selector = null) => GetUserPrivileges(selector.InvokeOrDefault(new GetUserPrivilegesDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public Task<GetUserPrivilegesResponse> GetUserPrivilegesAsync(Func<GetUserPrivilegesDescriptor, IGetUserPrivilegesRequest> selector = null, CancellationToken ct = default) => GetUserPrivilegesAsync(selector.InvokeOrDefault(new GetUserPrivilegesDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public GetUserPrivilegesResponse GetUserPrivileges(IGetUserPrivilegesRequest request) => DoRequest<IGetUserPrivilegesRequest, GetUserPrivilegesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>security.get_user_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html</a>
		/// </summary>
		public Task<GetUserPrivilegesResponse> GetUserPrivilegesAsync(IGetUserPrivilegesRequest request, CancellationToken ct = default) => DoRequestAsync<IGetUserPrivilegesRequest, GetUserPrivilegesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.has_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html</a>
		/// </summary>
		public HasPrivilegesResponse HasPrivileges(Func<HasPrivilegesDescriptor, IHasPrivilegesRequest> selector = null) => HasPrivileges(selector.InvokeOrDefault(new HasPrivilegesDescriptor()));
		/// <summary>
		/// <c>POST</c> request to the <c>security.has_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html</a>
		/// </summary>
		public Task<HasPrivilegesResponse> HasPrivilegesAsync(Func<HasPrivilegesDescriptor, IHasPrivilegesRequest> selector = null, CancellationToken ct = default) => HasPrivilegesAsync(selector.InvokeOrDefault(new HasPrivilegesDescriptor()), ct);
		/// <summary>
		/// <c>POST</c> request to the <c>security.has_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html</a>
		/// </summary>
		public HasPrivilegesResponse HasPrivileges(IHasPrivilegesRequest request) => DoRequest<IHasPrivilegesRequest, HasPrivilegesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>POST</c> request to the <c>security.has_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html</a>
		/// </summary>
		public Task<HasPrivilegesResponse> HasPrivilegesAsync(IHasPrivilegesRequest request, CancellationToken ct = default) => DoRequestAsync<IHasPrivilegesRequest, HasPrivilegesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html</a>
		/// </summary>
		public InvalidateApiKeyResponse InvalidateApiKey(Func<InvalidateApiKeyDescriptor, IInvalidateApiKeyRequest> selector) => InvalidateApiKey(selector.InvokeOrDefault(new InvalidateApiKeyDescriptor()));
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html</a>
		/// </summary>
		public Task<InvalidateApiKeyResponse> InvalidateApiKeyAsync(Func<InvalidateApiKeyDescriptor, IInvalidateApiKeyRequest> selector, CancellationToken ct = default) => InvalidateApiKeyAsync(selector.InvokeOrDefault(new InvalidateApiKeyDescriptor()), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html</a>
		/// </summary>
		public InvalidateApiKeyResponse InvalidateApiKey(IInvalidateApiKeyRequest request) => DoRequest<IInvalidateApiKeyRequest, InvalidateApiKeyResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_api_key</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html</a>
		/// </summary>
		public Task<InvalidateApiKeyResponse> InvalidateApiKeyAsync(IInvalidateApiKeyRequest request, CancellationToken ct = default) => DoRequestAsync<IInvalidateApiKeyRequest, InvalidateApiKeyResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html</a>
		/// </summary>
		public InvalidateUserAccessTokenResponse InvalidateUserAccessToken(string token, Func<InvalidateUserAccessTokenDescriptor, IInvalidateUserAccessTokenRequest> selector = null) => InvalidateUserAccessToken(selector.InvokeOrDefault(new InvalidateUserAccessTokenDescriptor(token)));
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html</a>
		/// </summary>
		public Task<InvalidateUserAccessTokenResponse> InvalidateUserAccessTokenAsync(string token, Func<InvalidateUserAccessTokenDescriptor, IInvalidateUserAccessTokenRequest> selector = null, CancellationToken ct = default) => InvalidateUserAccessTokenAsync(selector.InvokeOrDefault(new InvalidateUserAccessTokenDescriptor(token)), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html</a>
		/// </summary>
		public InvalidateUserAccessTokenResponse InvalidateUserAccessToken(IInvalidateUserAccessTokenRequest request) => DoRequest<IInvalidateUserAccessTokenRequest, InvalidateUserAccessTokenResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>security.invalidate_token</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html</a>
		/// </summary>
		public Task<InvalidateUserAccessTokenResponse> InvalidateUserAccessTokenAsync(IInvalidateUserAccessTokenRequest request, CancellationToken ct = default) => DoRequestAsync<IInvalidateUserAccessTokenRequest, InvalidateUserAccessTokenResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public PutPrivilegesResponse PutPrivileges(Func<PutPrivilegesDescriptor, IPutPrivilegesRequest> selector) => PutPrivileges(selector.InvokeOrDefault(new PutPrivilegesDescriptor()));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public Task<PutPrivilegesResponse> PutPrivilegesAsync(Func<PutPrivilegesDescriptor, IPutPrivilegesRequest> selector, CancellationToken ct = default) => PutPrivilegesAsync(selector.InvokeOrDefault(new PutPrivilegesDescriptor()), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public PutPrivilegesResponse PutPrivileges(IPutPrivilegesRequest request) => DoRequest<IPutPrivilegesRequest, PutPrivilegesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_privileges</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "TODO">TODO</a>
		/// </summary>
		public Task<PutPrivilegesResponse> PutPrivilegesAsync(IPutPrivilegesRequest request, CancellationToken ct = default) => DoRequestAsync<IPutPrivilegesRequest, PutPrivilegesResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html</a>
		/// </summary>
		public PutRoleResponse PutRole(Name name, Func<PutRoleDescriptor, IPutRoleRequest> selector) => PutRole(selector.InvokeOrDefault(new PutRoleDescriptor(name: name)));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html</a>
		/// </summary>
		public Task<PutRoleResponse> PutRoleAsync(Name name, Func<PutRoleDescriptor, IPutRoleRequest> selector, CancellationToken ct = default) => PutRoleAsync(selector.InvokeOrDefault(new PutRoleDescriptor(name: name)), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html</a>
		/// </summary>
		public PutRoleResponse PutRole(IPutRoleRequest request) => DoRequest<IPutRoleRequest, PutRoleResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html</a>
		/// </summary>
		public Task<PutRoleResponse> PutRoleAsync(IPutRoleRequest request, CancellationToken ct = default) => DoRequestAsync<IPutRoleRequest, PutRoleResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html</a>
		/// </summary>
		public PutRoleMappingResponse PutRoleMapping(Name name, Func<PutRoleMappingDescriptor, IPutRoleMappingRequest> selector) => PutRoleMapping(selector.InvokeOrDefault(new PutRoleMappingDescriptor(name: name)));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html</a>
		/// </summary>
		public Task<PutRoleMappingResponse> PutRoleMappingAsync(Name name, Func<PutRoleMappingDescriptor, IPutRoleMappingRequest> selector, CancellationToken ct = default) => PutRoleMappingAsync(selector.InvokeOrDefault(new PutRoleMappingDescriptor(name: name)), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html</a>
		/// </summary>
		public PutRoleMappingResponse PutRoleMapping(IPutRoleMappingRequest request) => DoRequest<IPutRoleMappingRequest, PutRoleMappingResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_role_mapping</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html</a>
		/// </summary>
		public Task<PutRoleMappingResponse> PutRoleMappingAsync(IPutRoleMappingRequest request, CancellationToken ct = default) => DoRequestAsync<IPutRoleMappingRequest, PutRoleMappingResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html</a>
		/// </summary>
		public PutUserResponse PutUser(Name username, Func<PutUserDescriptor, IPutUserRequest> selector) => PutUser(selector.InvokeOrDefault(new PutUserDescriptor(username: username)));
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html</a>
		/// </summary>
		public Task<PutUserResponse> PutUserAsync(Name username, Func<PutUserDescriptor, IPutUserRequest> selector, CancellationToken ct = default) => PutUserAsync(selector.InvokeOrDefault(new PutUserDescriptor(username: username)), ct);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html</a>
		/// </summary>
		public PutUserResponse PutUser(IPutUserRequest request) => DoRequest<IPutUserRequest, PutUserResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>PUT</c> request to the <c>security.put_user</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html</a>
		/// </summary>
		public Task<PutUserResponse> PutUserAsync(IPutUserRequest request, CancellationToken ct = default) => DoRequestAsync<IPutUserRequest, PutUserResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>ssl.certificates</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html</a>
		/// </summary>
		public GetCertificatesResponse GetCertificates(Func<GetCertificatesDescriptor, IGetCertificatesRequest> selector = null) => GetCertificates(selector.InvokeOrDefault(new GetCertificatesDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>ssl.certificates</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html</a>
		/// </summary>
		public Task<GetCertificatesResponse> GetCertificatesAsync(Func<GetCertificatesDescriptor, IGetCertificatesRequest> selector = null, CancellationToken ct = default) => GetCertificatesAsync(selector.InvokeOrDefault(new GetCertificatesDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>ssl.certificates</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html</a>
		/// </summary>
		public GetCertificatesResponse GetCertificates(IGetCertificatesRequest request) => DoRequest<IGetCertificatesRequest, GetCertificatesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>ssl.certificates</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html</a>
		/// </summary>
		public Task<GetCertificatesResponse> GetCertificatesAsync(IGetCertificatesRequest request, CancellationToken ct = default) => DoRequestAsync<IGetCertificatesRequest, GetCertificatesResponse>(request, request.RequestParameters, ct);
	}
}